package com.zoweunion.mechanic.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.zoweunion.mechanic.entity.CarPersonEntity;
import com.zoweunion.mechanic.entity.CarTemplateBean;
import com.zoweunion.mechanic.entity.FacilitatorPersonnelRelationEntity;
import com.zoweunion.mechanic.util.MyException;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author xp
 * @email 17688825585@163.com
 * @date 2020-07-22 16:18:41
 */
public interface FacilitatorPersonnelRelationService extends IService<FacilitatorPersonnelRelationEntity>{

    PageInfo<FacilitatorPersonnelRelationEntity> queryPage(Map<String, Object> map);

    /**
     * 根据手机号获取服务商
     * @param mobilePhone
     * @return
     */
    List<Map<String, Object>> getServerPhone(String mobilePhone);


    List<Map<String,Object>> getServerAccountInfo(String server_account);

    void updateUserRoleAdminAndaddFacilitator(Map<String, Object> reqMap);

    int addFacilitatorUser(Map<String, Object> reqMap);

    Map<String,Object> getServerById(String id);

    int edit(Map<String, Object> reqMap);

    int delete(Map<String, Object> reqMap) throws MyException;

    PageInfo facilitatorList(Map<String, Object> reqMap);

    void carPersonInsert(CarPersonEntity carPersonEntity) throws MyException;

    PageInfo carList(Map<String, Object> reqMap);

    List<Map<String, Object>> carInfo(Map<String, Object> reqMap);

    void carDelete(Map<String, Object> reqMap);

    void carPersonUpdate(CarPersonEntity carPersonEntity);

    PageInfo facilitatorCarList(Map<String, Object> reqMap);

    void carListDelete(Map<String, Object> reqMap);

    List<Map<String, Object>> facilitatorByList(Map<String, Object> reqMap);

    PageInfo certificateList(Map<String, Object> reqMap);

    int certificateCount(Map<String, Object> reqMap);

    PageInfo carListCountAlarm(Map<String, Object> reqMap);

    PageInfo alarmList(Map<String, Object> reqMap);

    PageInfo equipmentList(Map<String, Object> reqMap);

    void insertEquipmentList(List<String> reqMap,String sid, String pid);

    PageInfo equipmentListAll(Map<String, Object> reqMap);

    /**
     * 解绑物联网卡
     * @param reqMap
     * @param sId  当前服务商的sid
     * @param pSId 主机厂的sid
     */
    void deleteEquipmentBatch(List<String> reqMap, String sId, String pSId);

    List<String> equipmentListRemove(Map<String, Object> reqMap);

    List<Map<String,Object>> selectCarListCon(Map<String, Object> reqMap);

    void insertHuman(Map<String, Object> reqMap);

    void updateHuman(Map<String, Object> reqMap);

    Object uploadCarId(MultipartFile file);

    Map<String, Object> headCount(Map<String, Object> params);

    Map<String, Object> mapForCarServer(Map<String, Object> params);

    Map<String,Object> mapForCarServerByPro(Map<String, Object> params);

    Map<String,Object> mapForCarServerBySid(Map<String, Object> params);

    Map<String,Object> carInfoByMap(Map<String, Object> params);

    Map<String,Object> serverList(Map<String, Object> params);

    Map<String,Object> getFacilitatorInfo(String id);

    PageInfo manuList(Map<String, Object> reqMap);

    void insertManu(List<String> thingsIds, String sid);

    PageInfo manuListBySid(Map<String, Object> reqMap);

    void removeManu(List<String> thingsIds, String sid);

    void insertManuBySid(CarPersonEntity userEntity) throws MyException;

    void insertManuByFac(CarPersonEntity userEntity);

    PageInfo carBySid(Map<String, Object> reqMap);

    void deleteManuByFac(CarPersonEntity userEntity);

    void importCarList(List<CarTemplateBean> result,String sid) throws MyException;

    PageInfo carForSid(Map<String, Object> reqMap);

    void pushDay();

    void pushMonth();

    void pushThingsId();

    void pushMoNiDay(int i);

    Map<String, Object> carInfoOwner(Map<String, Object> params);

    void uploadLockLimit(Map<String, Object> reqMap);

    Map<String, Object> carInfoOwnerVideoInfo(Map<String, Object> params);

    int setFacilitatorCarLockPolicy(Map<String, Object> reqMap);

    int updateFacilitatorCarLockPolicy(Map<String, Object> reqMap);

    int insertEquipmentListOfFinancial(Map<String, Object> reqMap);

    void deleteEquipmentBatchOfFinancial(Map<String, Object> reqMap);

    PageInfo getCarOwnerApplyUnlockList(Map<String, Object> reqMap);

    int updateOwnerApplyUnlockById(Map<String, Object> reqMap);
}

